package com.jinzhuo.music.dao;

import com.jinzhuo.music.domain.Collect;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 收藏mapper
 */
@Repository
public interface CollectionMapper {
    /*创建收藏*/
    public int createCollection(Collect pojo);
    /*删除收藏*/
    public int deleteCollection(Integer userId,Integer songId);
    /*查询所有收藏*/
    public List<Collect> queryAllCollection();
    /*查询某个用户的收藏列表*/
    public List<Collect> queryCollectionByUserId(Integer userId);
    /*查询某个用户是否已经收藏了某个歌曲*/
    public  int existSongId(@Param("userId") Integer userId, @Param("songId") Integer songId);
}
